/* NIM		: 23512187 */
/* Nama		: Karina Novita Suryani */
/* File		: mTime.c*/
/* Tanggal 	: 24 September 2012*/

#include "Time.h"
#include <stdio.h>

int main(){
	
	Time T1 = MakeTime(1,2,3);
	Time T2 = MakeTime(0,0,0);
	Time T3 = MakeTime(23,59,59);
	Time T4;
	
	BacaTime(&T4);
	TulisTime(T4);
	
	//Test IsValidTime
	printf("IsValidTime(-1,-1,-1) = %d\n",IsValidTime(-1,-1,-1));
	
	//Test Make Time
	printf("T1 = %d:%d:%d\n", GetHour(T1), GetMinute(T1), GetSecond(T1));
	printf("T2 = %d:%d:%d\n", GetHour(T2), GetMinute(T2), GetSecond(T2));
	printf("T3 = %d:%d:%d\n", GetHour(T3), GetMinute(T3), GetSecond(T3));

	//Test EgTime
	printf("EqTime (T1,T1) = %d\n", EqTime(T1,T1));
	printf("EqTime (T1,T2) = %d\n", EqTime(T1,T2));
	
	//Test IsGreaterThan
	printf("IGT (T1,T1) = %d\n", isGreaterThan(T1,T1));
	printf("IGT (T1,T2) = %d\n", isGreaterThan(T1,T2));
	
	//Test IsLessThan
	printf("ILT (T1,T1) = %d\n", isLessThan(T1,T1));
	printf("ILT (T2,T1) = %d\n", isLessThan(T2,T1));
	
	//Test NextSec
	T4 = NextSec(T3);
	printf("NextSec(T3) = %d:%d:%d\n", GetHour(T4), GetMinute(T4), GetSecond(T4));
	
	//text BeforSec
	T4 = BeforSec(T2);
	printf("BeforeSec(T2) = %d:%d:%d\n", GetHour(T4), GetMinute(T4), GetSecond(T4));

	//Test AddTime
	T4 = AddTime(T2,T1);
	printf("AddTime(T2,T1) = %d:%d:%d\n", GetHour(T4), GetMinute(T4), GetSecond(T4));

	//Test AccTime
	AccTime(&T2,T1);
	printf("AccTime(T2,T1) = %d:%d:%d\n", GetHour(T2), GetMinute(T2), GetSecond(T2));

	
	return 0;
}